import { ScsConstants } from './ScsConstants';

function DispatchOtherCtrl(){}
import { DispatchCtrlLib } from '../chromeLib/DispatchCtrlLib'
/**
 * 发送消息广播通知
 * @param   noticeid          isp_notice的id
 */

DispatchOtherCtrl.MsgBroadcast=function(noticeId){
  let ret = DispatchCtrlLib.MsgBroadcast(noticeId);
  if(ret<0){
    console.log(ScsConstants.Parametor_Error);
    return;
  }
}

/**
 * @param   枚举设备
 */

DispatchOtherCtrl.LocalDevShow=function(){
  let retobj = DispatchCtrlLib.LocalDevShow();
  return retobj;
}

/**
 * @param   选择设备
 * Type     int   设备类型  0-扬声器 1-麦克风 2-摄像头
 * DevID    string  设备id
 */

DispatchOtherCtrl.LocalDevSet=function(Type, DevID){
  let ret = DispatchCtrlLib.LocalDevSet(Type, DevID);
  return ret;
}

/**
 * @param   通话中切换摄像头设备
 * @param    CallID   int        呼叫标识
 * @param    DevID    string     视频源ID
 */

DispatchOtherCtrl.VoipSetLocalCapture=function(CallID,DevID){
  DispatchCtrlLib.VoipVideoSetSource(CallID,DevID);
  // let ret ;
  // if(DevID=="screen"){
  //   ret = "screen";
  // }else{
  //   ret = "notshare";
  // }
  // return ret;
}

/**
 * @param   播放提示音
 * @param    SoundID   int
 0-停止播放
 1-监听成功
 2-一键告警
 3-消息提示
 4-呼叫调度台
 5-话权申请成功
 6-话权申请失败
 7-来电提示
 */

DispatchOtherCtrl.PlaySoundReq=function(SoundID){
  DispatchCtrlLib.PlaySoundReq(SoundID);
  // let ret ;
  // if(DevID=="screen"){
  //   ret = "screen";
  // }else{
  //   ret = "notshare";
  // }
  // return ret;
}
//窗口设置名字
DispatchOtherCtrl.WinSetName=function(Name){
  DispatchCtrlLib.WinSetName(Name);
}
//窗口发送消息
DispatchOtherCtrl.WinSendMsg=function(Target, Content){
  DispatchCtrlLib.WinSendMsg(Target, Content);
}
export { DispatchOtherCtrl }
